/**
 * @Title: WebserviceConfig.java
 * @Package com.haciai.util
 * @Description: TODO
 * Copyright: Copyright (c) 2013 
 * Company:淮安冲浪软件科技有限公司
 * 
 * @author zyue
 * @date 2013年8月22日 下午2:17:55
 * @version V1.0
 */

package com.clkj.sunhelp.mvp.seekhelpnew;

import org.kxml2.kdom.Element;
import org.kxml2.kdom.Node;

/**
 * @ClassName: WebserviceConfig
 * @Description: TODO
 * @author zyue
 * @date 2013年8月22日 下午2:17:55
 * 
 */ 

public class WebserviceConfig {
	//public static final String SERVERADDRESS = "http://222.184.103.50:1030/haciaiws/";
	public static final String SERVERADDRESS = "http://222.184.30.86:8080/haciaiws/";//生产环境
	//public static final String SERVERADDRESS = "http://192.168.2.69:8080/haciaiws/";//测试环境
	//public static final String HACIAIUPURL = "http://www.haciai.cn/up/";
	public static final String HACIAIUPURL = "http://222.184.30.86:8080/haciaiws/servlet/getImage?imagename=";
	public static final String ADDFWL = "http://haciai.cn/appserver/addFWL/?type=android";
	/**
	 * 命名空间 使用时 替换 #@#
	 */
	public static final String TARGETNAMESPACE = "http://#@#.ws.haciai.com/";

	/**
	 * webservices的地址 http://192.168.2.84:8080/haciaiws/services/Qzxx 中
	 * 的http://192.168.2.84:8080/haciaiws/services/
	 */
	public static final String WSADDRESS =SERVERADDRESS+"services/";
	public static final String GETDATEURL =SERVERADDRESS+"servlet/getServerTime";
	public static String HomePageBannerUrls =SERVERADDRESS+"images/" ;

	/**
	 * 
	  * @Title: getSoapHeader
	  * @Description: 获取soap头验证内容
	  * @param @param tgn
	  * @param @return    设定文件
	  * @return Element[]    返回类型
	  * @throws
	 */
	public static Element[] getSoapHeader(String tgn) {
		// soapheader在这里
		Element[] header = new Element[1];
		header[0] = new Element().createElement(tgn, "AuthenticationToken");
		Element username = new Element().createElement(tgn, "Username");
		username.addChild(Node.TEXT, "test");
		header[0].addChild(Node.ELEMENT, username);
		Element pass = new Element().createElement(tgn, "Password");
		pass.addChild(Node.TEXT, "test");
		header[0].addChild(Node.ELEMENT, pass);
		return header;
	}
}
